QT += serialbus

TEMPLATE = lib
CONFIG += plugin

CONFIG += c++11
CONFIG += skip_target_version_ext

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_BITRATE_500K
DEFINES += QT_PROJECT_T5

unix{
    DEFINES -= QT_PRO_DEBUG_ON_WINDOWS                      # Run on Linux platform
}
else {
    DEFINES += QT_PRO_DEBUG_ON_WINDOWS                      # Run on Windows platform
}

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    can_device.cpp \
    can_manage.cpp \
    can_plugin.cpp \
    share_function.cpp

HEADERS += \
    $$PWD/../serialport/def_serialport.h \
    can_device.h \
    can_manage.h \
    can_plugin.h \
    cycle_buffer.h \
    defines/def_frame_protocol.h \
    i_can.h \
    share_function.h

DISTFILES += can.json \
    README.md

TARGET          = $$qtLibraryTarget(can)
#DESTDIR         = ../plugins

INCLUDEPATH += \
    $$PWD/../serialport/

CONFIG(debug, debug|release){
    DEFINES += DEF_DEBUG_PC
    DEFINES -= QT_NO_DEBUG_OUTPUT

    OBJECTS_DIR += build/debug_obj
    DESTDIR         = ../output/debug
}

CONFIG(release, debug|release){
    DEFINES -= DEF_DEBUG_PC
    DEFINES += QT_NO_DEBUG_OUTPUT

    OBJECTS_DIR += build/release_obj
    DESTDIR         = ../output/release
}

RCC_DIR += build/rcc
MOC_DIR += build/mod

# Default rules for deployment.
unix {
    target.path = $$[QT_INSTALL_PLUGINS]/generic
}

!isEmpty(target.path): INSTALLS += target
VERSION = 1.0.0.0
#RC_ICONS = Images/App.ico
QMAKE_TARGET_COMPANY = "ripnano biotechnology(GuangZhou) Co., Ltd"
QMAKE_TARGET_PRODUCT = "can"
QMAKE_TARGET_DESCRIPTION = "Can communication module"
QMAKE_TARGET_COPYRIGHT = "Copyright 2023 ripnano Ltd. All rights reserved."
RC_LANG = 0x0004
